<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2018/6/7
 * Time: 15:55
 */

namespace app\index\controller\gupiao;


use app\index\controller\Base;
use think\Db;

class Mycenter extends Base
{

    // 个人中心
    public function myCenter(){

        $this->assign('photo',$this->photo);
        $this ->assign('username',$this->username);
        $yu = Db::name('users') -> field('balance,is_manager') -> where('id',$this ->uid) -> find();
        $this -> assign('yu',$yu);
        //判断是否有新增留言或回复
        $res=Db::name('rewords')->where('is_teacher',0)->where('sort',1)->select();
        if($res){
            $flag=1;
        }else{
            $flag=0;
        }
        $rr=Db::name('rewords')->where('is_teacher',1)->where('sort',1)->select();
        if($rr){
            $sort=1;
        }else{
            $sort=0;
        }
        $this->assign('flag',$flag);
        $this->assign('sort',$sort);
        return $this ->fetch();

    }


    // 充值界面
    public function recharge(){

        return $this -> fetch();
    }



    // 交易记录
    public function transaction(){

        return $this -> fetch();
    }


    // 未读回复
    public function unread(){

        return $this -> fetch();
    }


    // 添加股票
    public function gupiaoadd(){

      return  $this -> fetch();
    }


    // 查看回复
    public  function unreadlnfo(){
        $id = input('id');
        $this -> assign('id',$id);
        return $this -> fetch();
    }

    //  充值记录
    public  function rechargerecord(){

        return $this -> fetch();
    }



}